package control;
import model.UserDTO;
public class UserSession {
	
	private String sessionID = null;
	private UserDTO user = null;
	public String getSessionID() {
		return sessionID;
	}
	public void setSessionID(String sessionID) {
		this.sessionID = sessionID;
	}
	public UserDTO getUser() {
		return user;
	}
	public void setUser(UserDTO user) {
		this.user = user;
	}
	
	public boolean isStaff(UserDTO user)
	{
		if (user == null)
			return false;
		return user.getRole().equals("staff");
	}

	public boolean isManager() {
		if (user == null)
			return false;
		return user.getRole().equals("manager");
	}

	public boolean isAdmin() {
		if (user == null)
			return false;
		return user.getRole().equals("admin");
	}
	
	

}
